<style>
    #ingboy{
        font-size: 14px;
        width: 55%;
        height:620px;
        float: left;
    }
    #storedetail{
        line-height: 36px;
        padding-left: 20px;
        padding-bottom: 10px;
    }
    #bf{
        background-color: #eee;
        text-align: right;
        width: 150px;
    }
    #cf{
        width: 200px;
    }
</style>
<script type="text/javascript" src="http://demo.swfupload.org/v220/swfupload/swfupload.js"></script>
<script type="text/javascript" src="http://demo.swfupload.org/v220/simpledemo/js/swfupload.queue.js"></script>
<script type="text/javascript" src="http://demo.swfupload.org/v220/simpledemo/js/handlers.js"></script>
<script type="text/javascript" src="http://demo.swfupload.org/v220/simpledemo/js/fileprogress.js"></script>

<div id="ingboy">
    <div id='storedetail'>
        包裹信息
        <table width="720" border="1" cellpadding="0" cellspacing="0">
            <tr>
              <td id='bf'>所属用户：</td>
              <td id='cf'>&nbsp;&nbsp;<?php if($this->storedetail->userinfo) echo $this->storedetail->userinfo->nikename; else echo ''; ?></td>
              <td id='bf'>仓库号：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->bystoreno->storeno;?></td>
            </tr>
            <tr>
              <td id='bf'>包裹名称：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<?php echo $this->storedetail->productName;?>
                  <?php if($this->storedetail->cnShipFee != 0){?><span style="color:red;">(国内运费：<?php echo $this->storedetail->cnShipFee;?>)</span><?php }?></td>
            </tr>
            <tr>
              <td id='bf'>状态：</td>
              <td id='cf' style="color:red;font-size:16px;font-weight:900;">&nbsp;&nbsp;<?php echo $this->storedetail->state==1?"入库":"出库";?></td>
              <td id='bf'>物品编号：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->barcode;?></td>
            </tr>
            <tr>
              <td id='bf'>入库时间：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->dateInStore;?></td>
              <td id='bf'>出库时间：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->dateOut;?></td>
            </tr>
            <tr>
              <td id='bf'>物流单号：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->orderNo;?></td>
              <td id='bf'>物品类型：</td>
              <td id='cf'>&nbsp;&nbsp;<? if($this->storedetail->ItemType == 0){echo "正常";}else{ foreach(Application_Model_StoreItem::getNames() as $key=>$value){ 
                                            if($key != 0 && ($this->storedetail->ItemType & $key) == $key){
                                                echo $value."&nbsp;&nbsp;";
                                           } } } ?></td>
            </tr>
            <tr>
              <td id='bf'>重量：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->weight;?></td>
              <td id='bf'>体积重量类型：</td>
              <td id='cf'>&nbsp;&nbsp;<?php switch ($this->storedetail->bignessType) {
                                        case 0:
                                            echo "普通";
                                            break;
                                        case 1:
                                            echo "轻抛";
                                            break;
                                        case 2:
                                            echo "抛";
                                            break;
                                        case 3:
                                            echo "重抛";
                                            break;
                                        default:
                                            echo "普通";
                                            break;
                                        } ?></td>
            </tr>
            <tr>
              <td id='bf'>体积：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo  $this->storedetail->length.'*'.$this->storedetail->width.'*'.$this->storedetail->height;?></td>
              <td id='bf'>体积重量：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->volumeWeight;?></td>
            </tr>
            <tr>
              <td id='bf'>有包装：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->isPack  == 1?"是":"否";?></td>
              <td id='bf'>是否是防牌：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->isPack  == 1?"是":"否";?></td>
            </tr>
            <tr>
              <td id='bf'>是否真空处理：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->canVacuum == 1?"是":"否";?></td>
              <td id='bf'>是否禁运品：</td>
              <td id='cf'>&nbsp;&nbsp;<?php echo $this->storedetail->isEmbargo  == 1?"是":"否";?></td>
            </tr>
            <tr>
              <td id='bf'>包裹来源：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<?php echo $this->storedetail->intype;?></td>
            </tr>
            <tr>
              <td id='bf'>包裹备注：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<?php echo $this->storedetail->remark;?></td>
            </tr>
            <tr>
              <td id='bf'>图片：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<a href="<?= $this->cdn ?><?= is_file('big'.$this->storedetail->imageFile)?('/big'.$this->storedetail->imageFile):($this->storedetail->imageFile) ?>"  target="_blank">
                  <img src="<?= $this->cdn ?><?php echo $this->storedetail->image;?>" style="vertical-align:middle;"/></a></td>
            </tr>
            <tr>
              <td id='cf' colspan="4" align="center" height="37px">
                  <input type="button" id="editimg" naem="editimg" value="更换图片" style="font-size: 14px;"/>
                  <input type="button" id="refo" naem="refo" value="返回" style="font-size: 14px;"/></td>
            </tr>
          </table>
    </div>
</div>
<div class="tanchuang" style="display:none;">
    <div class="nui-msgbox">
        <div class="nui-msgbox-hd">问题代支付</div>
        <a class="nui-msgbox-close" title="关闭" id="exitissue"><b></b></a>
    </div>
    <div class="neirbox">
        <form method="post" action="/admini/managestore/storedetail/id/<?php echo $this->storedetail->id;?>" id="formstore">
         <?= $this->formHidden('image', '/pic/wu40.png') ?>
            <div class="fieldset flash" id="fsUploadProgress">
                <span class="legend">Upload Queue</span>
            </div>
            <div id="divStatus">0 Files Uploaded</div>
            <div>
                <span id="stt"></span></br>
                <input id="btnCancel" type="button" value="Cancel All Uploads" onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
            </div>
            <div style="position: absolute;margin-left:120px;margin-top:-100px">
                <image id="pimage" src="/pic/wu40.png" />
            </div>
	<div class="neirboxok">
            <input type="hidden" id="storeid" name="storeid" value="<?php echo $this->storedetail->id;?>" />
            <input type="hidden" id="operate" name="operate" value="editimg" />
            <a class="anvbotton" href="javascript:void(0)" id="substore"><span>确认提交</span></a>
        </div>  
        </form>
    </div>
</div>
<div class="houtai_overlay" style="display:none;"></div>
<div style="width:280px;float: left;" id="printform">
    <script type="text/javascript" src="/admins/js/jquery/jquery.PrintArea.js"></script>
    <div id="printadd" style="width:280px;text-align: center;">
        <style>
        body{
            -webkit-print-color-adjust: exact;
        }
        </style>
        <div style='margin-bottom: 10px;width:250px;margin-left: 35px;margin-top: -5px;'>
            <div style="width:30px;float:left;margin-bottom: 10px;margin-top: -10px;">&nbsp;</div>
            <div style="width:200px;float:left;text-align: left;font-size: 12px;font-family: Microsoft yahei;margin-top: -8px;">悠奇个人云仓库
                <div id="loginstoreno" style="margin-right:50px;text-align:right;float:right;width:50px;font-size:14px;font-weight:900;"><?php echo $this->storedetail->bystoreno->storeno; ?>
                </div></div>
        </div>
        <div style='margin-bottom: 10px;width:280px;margin-left: 5px;float:left;'>
            <div style="width:30px;float:left;">&nbsp;</div>
            <div style="width:210px;float:left;text-align: center;"><img src="/barcode/barcode.php?codebar=BCGcode128&text=<?php echo $this->storedetail->barcode;?>" alt="barcode" width="150px" height="60px" style="margin-left:2px"/></div>
        </div>
    </div>
    <div style="margin-left: 120px;width: 250px;float: left;" id="scbcode">
        <input type="button" id="printcode" naem="printcode" value="打印条形码" style="background-color: #FF8312;width: 80px;height: 30px;color: white;font-size: 14px;border-radius:8px;margin-left: 20px;"/>
    </div>
    <script type="text/javascript" >
        $('#scbcode #printcode').click(function(){
            $("div#printform div#printadd").printArea(); 
        });
    </script>
</div>

<script type="text/javascript">
    $("#refo").click(function(){
        location.href = "/admini/managestore/index/"; 
    });
    $("#substore").live("click",function(){
        $('#formstore').submit();
    });
    $("#editimg").live("click",function(){
        $("div.houtai_overlay").attr("style","display:block;");
        $("div.tanchuang").attr("style","display:block;");
    });
    $("#exitissue").live("click",function(){
        $("div.houtai_overlay").attr("style","display:none;");
        $("div.tanchuang").attr("style","display:none;");
    });
</script>
<script type="text/javascript">
    var swfu;

    window.onload = function() {
        var settings = {
            flash_url : "/js/swfupload/swfupload.swf",
            upload_url: "/ajax/upload",
            post_params: {"PHPSESSID" : ""},
            file_size_limit : "100 MB",
            file_types : "*.jpeg;*.png;*.jpg;*.gif",
            file_types_description : "图片文件",
            file_upload_limit : 100,
            file_queue_limit : 0,
            custom_settings : {
                progressTarget : "fsUploadProgress",
                cancelButtonId : "btnCancel"
            },
            debug: false,

            // Button settings
            button_image_url: "/images/share/button.gif",
            button_width: "65",
            button_height: "29",
            button_placeholder_id: "stt",
            button_text: '<span class="theFont">上传图片</span>',
            button_text_style: ".theFont { font-size: 16; }",
            button_text_left_padding: 12,
            button_text_top_padding: 3,
				
            // The event handler functions are defined in handlers.js
            file_queued_handler : fileQueued,
            file_queue_error_handler : fileQueueError,
            file_dialog_complete_handler : fileDialogComplete,
            upload_start_handler : uploadStart,
            upload_progress_handler : uploadProgress,
            upload_error_handler : uploadError,
            upload_success_handler : function(file,data){
                $('#image').val($.parseJSON(data));
                $('#pimage').attr('src',$('#image').val());
                var progress = new FileProgress(file, this.customSettings.progressTarget);
                progress.setComplete();
                progress.setStatus("Complete.");
                progress.toggleCancel(false);
            },
            //upload_success_handler : uploadSuccess,
            upload_complete_handler : uploadComplete,
            queue_complete_handler : queueComplete	// Queue plugin event
        };

        swfu = new SWFUpload(settings);
    };
</script>